<?php require_once('../Connections/conexion.php'); ?>
<?php
mysql_select_db($database_conexion, $conexion);
$query_bombas = "SELECT * FROM bomba ORDER BY NOMBRE_BOMBA ASC";
$bombas = mysql_query($query_bombas, $conexion) or die(mysql_error());
$row_bombas = mysql_fetch_assoc($bombas);
$totalRows_bombas = mysql_num_rows($bombas);

mysql_select_db($database_conexion, $conexion);
$query_filtros = "SELECT * FROM filtro ORDER BY NOMBRE_FILTRO ASC";
$filtros = mysql_query($query_filtros, $conexion) or die(mysql_error());
$row_filtros = mysql_fetch_assoc($filtros);
$totalRows_filtros = mysql_num_rows($filtros);

mysql_select_db($database_conexion, $conexion);
$query_tubos = "SELECT * FROM tubo ORDER BY NOMBRE_TUBO ASC";
$tubos = mysql_query($query_tubos, $conexion) or die(mysql_error());
$row_tubos = mysql_fetch_assoc($tubos);
$totalRows_tubos = mysql_num_rows($tubos);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/principal1.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Maquetando con estilos CSS</title>
<!-- InstanceEndEditable -->
<link href="../styles/estilos.css" rel="stylesheet" type="text/css">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
        <div id="contenedor">
                <div id="cabecera">
                  <div align="right"><!-- InstanceBeginEditable name="menu_superior" -->menu_superior<!-- InstanceEndEditable -->
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                    <p>&nbsp;</p>
                  </div>
                </div>
                <div id="barra-lateral">
                  <div align="justify"><!-- InstanceBeginEditable name="menu" -->
				  <div class="boton1">
				  <a href="nuevo_proyecto.php">Nuevo Proyecto</a></div>
				  <div class="boton2">
				  <a href="nueva_bomba.php">Registrar Bomba</a>				  </div>
				  <div class="boton3">
				  <a href="nuevo_tubo.php">Registrar Tubo</a>				  </div>
				  <div class="boton4">
				  <a href="nuevo_filtro.php">Registrar Filtro</a>				  </div>
				  <div class="boton5">
				  <a href="nueva_litologia.php">Registrar Litologia</a>				  </div>
				  <!-- InstanceEndEditable --></div>
                </div>
                   <div id="contenido"> 
                     <div align="justify"><!-- InstanceBeginEditable name="cuerpo" -->
					 <fieldset><legend><font size="+1">Datos Generales del Perfil</legend>
           <div>
             <form method="post" name="form1" action="guardar_proyecto.php">
               <table align="center">
                 <tr valign="baseline">
                   <td nowrap align="right">CODIGO PROYECTO:</td>
                   <td><input type="text" name="COD_PERFIL" value="" size="32" /></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">FECHA CREACION:</td>
                   <td><input type="text" name="FECHA_CREACION" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">NOMBRE DE PROPIETARIO:</td>
                   <td><input type="text" name="NOMBRE_PROPIETARIO" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">DEPARTAMENTO:</td>
                   <td><select name="DEPARTAMENTO">
                       <option value="Cochabamba" <?php if (!(strcmp("Cochabamba", ""))) {echo "SELECTED";} ?>>Cochabamba</option>
                       <option value="Santa Cruz" <?php if (!(strcmp("Santa Cruz", ""))) {echo "SELECTED";} ?>>Santa Cruz</option>
                       <option value="Chuquisaca" <?php if (!(strcmp("Chuquisaca", ""))) {echo "SELECTED";} ?>>Chuquisaca</option>
                       <option value="Potosi" <?php if (!(strcmp("Potosi", ""))) {echo "SELECTED";} ?>>Potosi</option>
                       <option value="Tarija" <?php if (!(strcmp("Tarija", ""))) {echo "SELECTED";} ?>>Tarija</option>
                       <option value="Oruro" <?php if (!(strcmp("Oruro", ""))) {echo "SELECTED";} ?>>Oruro</option>
                       <option value="Pando" <?php if (!(strcmp("Pando", ""))) {echo "SELECTED";} ?>>Pando</option>
                       <option value="La Paz" <?php if (!(strcmp("La Paz", ""))) {echo "SELECTED";} ?>>La Paz</option>
                       <option value="Beni" <?php if (!(strcmp("Beni", ""))) {echo "SELECTED";} ?>>Beni</option>
                     </select>                   </td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">MUNICIPIO:</td>
                   <td><input type="text" name="MUNICIPIO" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">PROFUNDIDAD ENTUBADA:</td>
                   <td><input type="text" name="PROFUNDIDAD_ENTUBADA" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">PROFUNDIDAD PERFORADA:</td>
                   <td><input type="text" name="PROFUNDIDAD_PERFORADA" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">BOMBA:</td>
                   <td><select name="COD_BOMBA">
                       <?php 
do {  
?>
                       <option value="<?php echo $row_bombas['COD_BOMBA']?>" ><?php echo $row_bombas['NOMBRE_BOMBA']?></option>
                       <?php
} while ($row_bombas = mysql_fetch_assoc($bombas));
?>
                     </select></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">TUBO:</td>
                   <td><select name="COD_TUBO">
                       <?php 
do {  
?>
                       <option value="<?php echo $row_tubos['COD_TUBO']?>" ><?php echo $row_tubos['NOMBRE_TUBO']?></option>
                       <?php
} while ($row_tubos = mysql_fetch_assoc($tubos));
?>
                     </select>                   </td>
                 <tr>
                 <tr valign="baseline">
                   <td nowrap align="right">FILTRO:</td>
                   <td><select name="COD_FILTRO">
                       <?php 
do {  
?>
                       <option value="<?php echo $row_filtros['COD_FILTRO']?>" ><?php echo $row_filtros['NOMBRE_FILTRO']?></option>
                       <?php
} while ($row_filtros = mysql_fetch_assoc($filtros));
?>
                     </select>                   </td>
                 <tr>
                 <tr valign="baseline">
                   <td nowrap align="right">NUMERO FILTROS:</td>
                   <td><input type="text" name="NUMERO_FILTROS" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">NIVEL ESTATICO:</td>
                   <td><input type="text" name="NIVEL_ESTATICO" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">NIVEL DINAMICO:</td>
                   <td><input type="text" name="NIVEL_DINAMICO" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">CAUDAL:</td>
                   <td><input type="text" name="CAUDAL" value="" size="32"></td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right" valign="top">OBSERVACIONES:</td>
                   <td><textarea name="OBSERVACIONES" cols="30" rows="5"></textarea>                   </td>
                 </tr>
                 <tr valign="baseline">
                   <td nowrap align="right">&nbsp;</td>
                   <td><input type="submit" value="Insertar registro"></td>
                 </tr>
               </table>
             
             </form>
             <p>&nbsp;</p>
           </div>
			</fieldset>
					
                     <!-- InstanceEndEditable --> </div>
                   </div>
                   <div id="pie">
				   <table width="100%" border="1" cellspacing="1" cellpadding="1">
  <tr>
    <td><span class="Estilo4"><a href="http://www.javier.com.co/terminos/">T&eacute;rminos y Condiciones de Uso</a> |</span></td>
    <td><span class="Estilo4">Copyright&copy;  Todos los derechos reservados - Desarrollado por <a href="http://www.Javier.com/" target="_blank" title="Javier">JAVIER T. </a></span></td>
    <td><span class="Estilo4"><a href="http://www.javier_tola.com>Ayuda</a> | </span></td>
    <td><a href=../Templates/%22http://www.javier_tola.com" class="Estilo4">Cont&aacute;cteme</a></td>
  </tr>
</table></div>
       </div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($bombas);

mysql_free_result($filtros);

mysql_free_result($tubos);
?>
